class SingleObject {
    private static instance: SingleObject = new SingleObject();
    private constructor() { };
    public static getInstance(): SingleObject {
        return this.instance;
    }
    public showMessage(): void {
        console.log('Hello World!');
    }
}

function main() {
    const instance: SingleObject = SingleObject.getInstance();
    instance.showMessage();
}

main();
